/*
 *  test/test_mm.c
 *
 *  Harry Wei <harryxiyou@gmail.com> (C) 2011
 */
#include <glib.h>

#include "mm.h"

int main(int agrc, char **argv)
{
	int ret = 0;
	uint32_t start_addr = 0;
	uint32_t mem_size = 10 * 1024;
	struct mm_ctrl *ctrl = mm_init(start_addr, mem_size);
	g_assert(ctrl != NULL);
	ret = new_process(ctrl, 1024, "testa");
	g_message("pid is %d, size is %d, start_addr is %d, end_addr is %d, process_name is %s", 
			ctrl->allocate_head->pid, ctrl->allocate_head->size, ctrl->allocate_head->start_addr, 
			ctrl->allocate_head->end_addr, ctrl->allocate_head->process_name);
	g_assert(ret == 0);
	ret = des_process(ctrl, 1024, "testa");
	g_assert(ret == 0);
	return 0;
}

